package com.size.mall;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.alibaba.dubbo.qos.common.Constants;
import com.alibaba.dubbo.qos.server.Server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableDubbo
public class SearchServiceApplicationApplication {

    public static void main(String[] args) {

        //配置dubbo.qos.port端口
        System.setProperty(Constants.QOS_PORT, "33333");
        //配置dubbo.qos.accept.foreign.ip是否关闭远程连接
        System.setProperty(Constants.ACCEPT_FOREIGN_IP, "false");

        SpringApplication.run(SearchServiceApplicationApplication.class, args);
        Server.getInstance().stop();
    }
}
